package io.renren.modules.wyzs.mobile_BillAdapterMoudle;


import io.renren.modules.wyzs.mobile_EnumMoudle.EnumFieldType;
import io.renren.modules.wyzsphone.commWithWCF.DropDownItem;

import java.util.LinkedList;
import java.util.List;

public class FieldTemp {
    /// <summary>
    /// ID
    /// </summary>
    private int ID;
    public int getID(){
        return this.ID;
    }
    public void setID(int ID){
        this.ID=ID;
    }
    /// <summary>
    /// 字段名
    /// </summary>
    private String Key;
    public String getKey(){
        return this.Key;
    }
    public void setKey(String Key){
        this.Key=Key;
    }
    /// <summary>
    /// 名称
    /// </summary>
    private String Name;
    public String getName(){
        return this.Name;
    }
    public void setName(String Name){
        this.Name=Name;
    }
    /// <summary>
    /// 数据类型
    /// </summary>
    private Integer Type;
    public Integer getType(){
        return this.Type;
    }
    public void setType(Integer Type) {
        this.Type=Type;
    }
    /// <summary>
    /// 索引号
    /// </summary>
    private int Index;
    public int getIndex(){
        return this.Index;
    }
    public void setIndex(int Index){
        this.Index=Index;
    }
    /// <summary>
    /// 所属表序号
    /// </summary>
    private int Page;
    public int getPage(){
        return this.Page;
    }
    public void setPage(int Page){
        this.Page=Page;
    }
    /// <summary>
    /// 下拉信息
    /// </summary>
    private List<DropDownItem> DropDownList = new LinkedList<DropDownItem>();
    public List<DropDownItem> getDropDownList(){
        return this.DropDownList;
    }
    public void setDropDownList(List<DropDownItem> DropDownList){
        this.DropDownList=DropDownList;
    }

    /// <summary>
    /// 是否显示在过滤列表
    /// </summary>
    private Boolean IsFilter;
    public Boolean getIsFilter(){
        return this.IsFilter;
    }
    public void setIsFilter(Boolean IsFilter){
        this.IsFilter=IsFilter;
    }
    /// <summary>
    /// 是否显示序时簿
    /// </summary>
    private Boolean IsList;
    public Boolean getIsList(){
        return this.IsList;
    }
    public void setIsList(Boolean IsList){
        this.IsList=IsList;
    }
    /// <summary>
    /// 是否需要保存
    /// </summary>
    private Boolean NeedSave;
    public Boolean getNeedSave(){
        return this.NeedSave;
    }
    public void setNeedSave(Boolean NeedSave){
        this.NeedSave=NeedSave;
    }
    /// <summary>
    /// 是否必须输入
    /// </summary>
    private Boolean MustInput;
    public Boolean getMustInput(){
        return this.MustInput;
    }
    public void setMustInput(Boolean MustInput){
        this.MustInput=MustInput;
    }
    /// <summary>
    /// 是否是合计字段
    /// </summary>
    private Boolean IsSum;
    public Boolean getIsSum(){
        return this.IsSum;
    }
    public void setIsSum(Boolean IsSum){
        this.IsSum=IsSum;
    }
    /// <summary>
    /// 列宽度
    /// </summary>
    private int Width;
    public int getWidth(){
        return this.Width;
    }
    public void setWidth(int Width){
        this.Width=Width;
    }
    /// <summary>
    /// 字段长度
    /// </summary>
    private int Length;
    public int getLength(){
        return this.Length;
    }
    public void setLength(int Length){
        this.Length=Length;
    }
    /// <summary>
    /// 获得字段下拉列表对应值
    /// </summary>
    /// <param name="dataID">下拉项ID</param>
    /// <returns></returns>
    public DropDownItem GetFieldDropDown(String dataID)
    {
        for (DropDownItem Value: DropDownList)
        {
            if (Value.getID() == dataID)
            {
                return Value;
            }
        }
        return null;
    }
    /// <summary>
    /// 获得字段下拉列表对应值
    /// </summary>
    /// <param name="dataName">下拉显示项</param>
    /// <returns></returns>
    public DropDownItem GetFieldDropDownByName(String dataName)
    {
        for (DropDownItem Value: DropDownList)
        {
            if (Value.getName() == dataName)
            {
                return Value;
            }
        }
        return null;
    }
}
